In HTML each character may be represented using it's corresponding character code or entity name, preceded by an ampersand and followed by a semicolon.
Non-Breaking Space
- The non-breaking space may be used to force browsers to display conceutive spaces.
- The non-breaking space is represented by or &160;.
This word has five spaces on each side of it.
This word has five spaces on each side of it.
- Since the non-breaking space is a character and not just white space – if it is the only space between a pair of words, no automatic line-breaking will occur.
Browsers will treat this sentence as a single word, for this reason word warp will not occur.
Browsers will treat this sentence as a single word, for this reason word warp will not occur.
Less Than (<) and Greater Than (>)
- Since angle brackets are used to indicate tags in HTML code, they will not display properly as part of content, use the corresponding character code to display them properly.
- The less than symbol may be represented using either < or &60;.
- The greater than symbol may be represented using either > or &62;.
HTML tags open and close with angle brackets (<, >).
HTML tags open and close with angle brackets (<, >).
Ampersand (&)
Since the ampersand is used to indicate the start of a character entity, it may not display properly as part of content.
Use either & or &38; to represent it instead.
The character code for the non-breaking space is .
The character code for the non-breaking space is &nbsp;.